<!DOCTYPE html>
<html>
<head>
	<meta charset="utf-8">
</head>
<body>
<canvas id="myCanvas" width="500" height="500" style="border:1px solid #000000;">
</canvas>
</body>
</html>
<script type="text/javascript">
	
	var c=document.getElementById("myCanvas");
	var ctx=c.getContext("2d");
	var grd=ctx.createLinearGradient(125,250,375,250);
	grd.addColorStop(0,"red");
	grd.addColorStop(0.5,"green")
	grd.addColorStop(1,"blue");
	ctx.fillStyle=grd;
	ctx.strokeStyle = '#fff';
	ctx.arc(250,250,125,0,2*Math.PI,);
	ctx.stroke();
	ctx.fill();

</script>